package com.rqbl.mapper;

import com.rqbl.entity.Post;
import org.apache.ibatis.annotations.Mapper;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author bruce
 * @since 2024-07-19
 */
@Mapper
public interface PostMapper {

    /**
     * 查询所有帖子（分页）
     * @param num
     * @param pageSize
     * @return
     */
    List<Post> selectAllPostPage(Integer num, Integer pageSize,Integer bid);

    Integer selectAllPostCount();

    Post selectPostByPid(Integer pid);

    Integer deletePostById(Integer pid);

    List<Post> selectAllPostPageUid(int num, Integer pageSize, Integer uid);

    Integer insertPostInfo(Post post);
}
